import http from '../utils/http'

export const pageTasks = (params) => http.get('/api/tasks', { params })
export const getTaskDetail = (id) => http.get(`/api/tasks/${id}`)
export const createTaskApi = (data) => http.post('/api/tasks', data)
export const updateTaskApi = (id, data) => http.put(`/api/tasks/${id}`, data)
export const deleteTaskApi = (id) => http.delete(`/api/tasks/${id}`)

export default {
  pageTasks,
  getTaskDetail,
  createTaskApi,
  updateTaskApi,
  deleteTaskApi,
}

